package com.yannan.lock.web.controller;

//
//import com.yannan.lock.core.constant.CoreConstant;
//import com.yannan.lock.core.vo.ResultResponse;
import com.yannan.lock.web.pojo.User;
import com.yannan.lock.web.service.UserService;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;


@Controller
public class HomeController {

    private Logger logger = Logger.getLogger(HomeController.class);

    @Autowired
    private UserService userService;


//    @RequestMapping("/")
//    @ResponseBody
//    public ResultResponse getUserInfo() {
//        ResultResponse res = new ResultResponse();
//        res.setRetCode(CoreConstant.RET_CODE_SUCCESS);
//        res.setMessage("InstallInterface Start Success");
//        return res;
//    }
    @RequestMapping("/a")
    @ResponseBody
    public User user() {

        return userService.getUserById(1);
    }


}
